import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Flutter Demo')
        ),
        //body内容多抽离出去
        body: HomeContent()
      )
    );
  }
  
}

//body
class HomeContent extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return  Center(
      child: Container(
        child: Text(
          '我是林浪痕，我在学习Flutter,一个跨平台的开发框架',
          textAlign: TextAlign.center,
          overflow: TextOverflow.ellipsis, //表示超出长度后，以三个点代替
          maxLines: 2,
          textScaleFactor: 1.2, //字体放大两倍 
          style: TextStyle(
            fontSize: 20.0,
            color: Colors.red,
            fontWeight: FontWeight.w800,
            fontStyle: FontStyle.italic,
            //下划线及样式
            decoration: TextDecoration.underline,
            decorationColor: Colors.black,
            decorationStyle: TextDecorationStyle.dashed,
            //字间距
            letterSpacing: 5.0
          ),
        ),
        height: 300.0,
        width: 300.0,
        decoration: BoxDecoration(
          color: Colors.yellow,
          border: Border.all(
            color: Colors.blue,
            width: 2.0
          ),
          borderRadius: BorderRadius.all(
            Radius.circular(10)
          ) 
        ),
        // padding: EdgeInsets.all(20),
        // padding: EdgeInsets.fromLTRB(10, 30, 5, 0),
        // margin: EdgeInsets.fromLTRB(10, 30, 5, 0),
        // transform: Matrix4.translationValues(100 ,0, 0),
        // transform: Matrix4.rotationZ(0.3),
        // transform: Matrix4.diagonal3Values(1.2, 1, 1),
        alignment: Alignment.centerLeft,
      ),
    );
  }
  
}